package org.tuoren.official.es.domain;

import lombok.Data;
import org.dromara.easyes.annotation.IndexField;
import org.dromara.easyes.annotation.IndexId;
import org.dromara.easyes.annotation.IndexName;
import org.dromara.easyes.annotation.rely.Analyzer;
import org.dromara.easyes.annotation.rely.FieldType;

import java.io.Serializable;
import java.util.Date;

/**
 * 文章业务对象 t_newscenter
 *
 * @author wp
 * @date 2024-11-29
 */
@Data
@IndexName(value = "blog_news")
public class TNewsCenterES implements Serializable {
    private static final long serialVersionUID = -1L;

    /**
     * 主键
     */
    @IndexId
    private Long id;

    /**
     * 新闻类型
     */
    private String newType;

    /**
     * 标题
     */
    @IndexField(fieldType = FieldType.TEXT,
        analyzer = Analyzer.IK_MAX_WORD, searchAnalyzer = Analyzer.IK_SMART)
    // @HighLight(preTag = "<text style='color:red'>",postTag = "</text>")
    private String title;

    /**
     * 封面图地址
     */
    private String coverUrl;

    /**
     * 描述
     */
    @IndexField(fieldType = FieldType.TEXT,
        analyzer = Analyzer.IK_MAX_WORD, searchAnalyzer = Analyzer.IK_SMART)
    // @HighLight(preTag = "<text style='color:red'>",postTag = "</text>")
    private String newDesc;

    /**
     * 内容
     */
    @IndexField(fieldType = FieldType.TEXT,
        analyzer = Analyzer.IK_MAX_WORD, searchAnalyzer = Analyzer.IK_SMART)
    // @HighLight(preTag = "<text style='color:red'>",postTag = "</text>")
    private String content;

    /**
     * 来源
     */
    @IndexField(fieldType = FieldType.TEXT,
        analyzer = Analyzer.IK_MAX_WORD, searchAnalyzer = Analyzer.IK_SMART)
    // @HighLight(preTag = "<text style='color:red'>",postTag = "</text>")
    private String source;

    /**
     * 资源地址
     */
    private String mediumUrl;

    /**
     * 发布时间
     */
    private Date publishDate;

    /**
     * 是否置顶（0：否；1：是）
     */
    private String isTop;

    /**
     * 发布时间年份
     */
    private Integer publishYear;

    /**
     * 发布时间月份
     */
    private Integer publishMonth;

    /**
     * 是否发布（0：否；1：是）
     */
    private String isPublish;

    /**
     * 发布时间格式化
     */
    private String publishDateFormat;

}
